package com.googlecode.mvcguice;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public final class RequestContext {
	private final HttpServletRequest request;
	private final HttpServletResponse response;
	private final Map<String, String> variables;

	public RequestContext(HttpServletRequest request, HttpServletResponse response, Map<String, String> variables) {
		this.request = request;
		this.response = response;
		this.variables = variables;
	}

	public HttpServletRequest getRequest() {
		return request;
	}

	public HttpServletResponse getResponse() {
		return response;
	}

	@SuppressWarnings("unchecked")
	public Map<String, String[]> getParams() {
		return request.getParameterMap();
	}

	public Map<String, String> getVariables() {
		return variables;
	}
}
